/**
 * 
 */
package com.onstar.cn.map.core.impl;

import com.amap.api.services.core.LatLonPoint;
import com.onstar.cn.map.core.OGeoPoint;

/**
 * @author Qiying Gong
 * 
 * @Date Jan 30, 2013 9:38:20 AM
 */
public final class OGeoPointImpl implements OGeoPoint{
	private LatLonPoint point;
	public OGeoPointImpl(double lat, double lon) {
		point = new LatLonPoint(lat, lon);
	}
	
	public static int convertToMicroDeg(double degree) {
		return (int) (degree * 1E6);
	}

	public static double convertToDeg(int microDegree) {
		return (microDegree / 1E6);
	}

	@Override
	public double getLatitude() {
		return point.getLatitude();
	}

	@Override
	public double getLongitude() {
		return point.getLongitude();
	}

	@Override
	public LatLonPoint getAMapPt() {
		return this.point;
	}
}
